package com.ykq.permission.controller.api;

import com.ykq.permission.service.UserService;
import com.ykq.pojo.entity.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @program: qy151-education-parent
 * @description:
 * @author: 闫克起2
 * @create: 2022-08-29 11:10
 *
 * api包下的接口都是给其他微服务提供的接口[返回类型建议为实体类]，如果不在api包的都是为前端提供的【返回类型为CommonResult】。
 **/
@RestController
@RequestMapping("/api/permission/user")
public class ApiUserController {
    @Autowired
    private UserService userService;

    @GetMapping("findByUsername")
    public User findByUsername(@RequestParam String username){
        return userService.selectByUsername(username);
    }


}
